///////////////////////////////////////////////////////////////////////////
//  Brainfreeze - Yet another sokoban puzzle game, this time in 3D
//  Copyright (C) 2006 Scott MacDonald
//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License as published by
//  the Free Software Foundation; either version 2 of the License, or
//  (at your option) any later version.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU General Public License for more details.
//
//  You should have received a copy of the GNU General Public License along
//  with this program; if not, write to the Free Software Foundation, Inc.,
//  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
///////////////////////////////////////////////////////////////////////////
// types.h - Definitions for various custom defined types, consts and other
// good stuff
#pragma once
#ifndef __BF_TYPES_H__
#define __BF_TYPES_H__

class MovableObject;				/* come on, is it really so much to ask to have the COMPILER FIGURE IT OUT??? */
class GameSession;
class GameRenderer3D;
class Player;
class InputController;
class MovableObject;

/*
 * a simple structure containing information on the move that the player
 * made
 */
typedef int MoveDirection;

struct GameMove
{
	MoveDirection direction;
	MovableObject* piece;
};

typedef unsigned char BYTE;

/*
 * hard constants - various hardcoded constants
 */
const int LEVEL_MAX_WIDTH		= 64;		// levels cannot be > 64 tiles in width
const int LEVEL_MAX_HEIGHT		= 64;		// levels cannot be > 64 tiles in height
const int LEVEL_MAX_BOXES		= 32;		// no more than 32 boxes
const int LEVEL_MAX_GOALS		= 32;		// no more than 32 goals (should be the same..)

const int LEVEL_TILE_WIDTH		= 50;		// (the width of a tile)
const int LEVEL_TILE_HEIGHT		= 50;		// (the length of a tile)
const int LEVEL_TILE_ZOFFSET	= 15;		// the z-dsiplacement for an object

const int DIRECTION_UP = 1;
const int DIRECTION_DOWN = 2;
const int DIRECTION_LEFT = 3;
const int DIRECTION_RIGHT = 4;

/*
 * sokoban level symbols - When we represent a sokoban level in text, the
 * following defines allow us to translate sokoban concepts into characters
 * 
 * (does that make sense?)
 */
const char SYM_COMMENT	= '\'';				// a line-level comment delimmiter
const char SYM_WALL     = '#';				// denotes a wall
const char SYM_EMPTY	= ' ';				// nothing (not a floor or wall)
const char SYM_GOAL		= '@';				// a goal square
const char SYM_PLAYER	= '$';				// the player's position
const char SYM_BOX		= '*';				// a box!

/*
 * object types - all the various things that we'd expect to see on
 * a sokoban level
 */
const BYTE ENTITY_NIL		= 0;
const BYTE ENTITY_FLOOR		= 1;
const BYTE ENTITY_WALL		= 2;
const BYTE ENTITY_PLAYER	= 5;
const BYTE ENTITY_BOX		= 10;
const BYTE ENTITY_GOAL		= 15;

#endif